import request from "@/utils/request.js";
import qs from 'qs'

const MODULE_NAME = '/knowledge'
export default {
    insert: (data) => {
        return request.post(`${MODULE_NAME}/knowledgeInfo/insert`, data)
    }, // 新增
    update: (data) => {
        return request.post(`${MODULE_NAME}/knowledgeInfo/update`, data)
    }, // 修改
    delete: (data) => {
        return request.post(`${MODULE_NAME}/knowledgeInfo/delete`, data)
    }, // 批量删除
    getById: (id) => {
        return request.get(`${MODULE_NAME}/knowledgeInfo/single?id=${id}`)
    }, // 单查询
    list: (data, page) => {
        return request.post(`${MODULE_NAME}/knowledgeInfo/list?${qs.stringify(page)}`, data)
    }, // 列表查询
}